import { Repository } from "typeorm";

import { TickMinute, TickMinuteGateway, TickGroup, TickGroupGateway, TickSymbol, TickSymbolGateway } from "qqlx-core";

import { SqliteDao } from "../../lib/dao.sqlite.id";

export class TickGroupDao extends SqliteDao<TickGroup> {
  constructor(readonly repo: Repository<TickGroup>) {
    super({
      repository: repo,
      relations_name: TickGroupGateway.relations,
      is_tiny_boolean: true,
    });
  }
}

export class TickSymbolDao extends SqliteDao<TickSymbol> {
  constructor(readonly repo: Repository<TickSymbol>) {
    super({
      repository: repo,
      relations_name: TickSymbolGateway.relations,
      is_tiny_boolean: true,
    });
  }
}

export class TickMinuteDao extends SqliteDao<TickMinute> {
  constructor(readonly repo: Repository<TickMinute>) {
    super({
      repository: repo,
      relations_name: TickMinuteGateway.relations,
      is_tiny_boolean: true,
    });
  }
}
